# Contributor: mio <miyopan@e.email>
# Maintainer: mio <miyopan@e.email>
pkgname=madonctl
pkgver=2.3.2
pkgrel=10
pkgdesc="CLI client for the Mastodon social network API"
url="https://github.com/McKael/madonctl"
license="MIT"
arch="all"
makedepends="go"
subpackages="$pkgname-doc"
source="madonctl-$pkgver.tar.gz::https://github.com/McKael/madonctl/archive/v$pkgver.tar.gz"
options="!check" # No tests

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build
}

package() {
	install -Dm0755 madonctl -t "$pkgdir"/usr/bin

	install -Dm0644 configuration.md -t "$pkgdir"/usr/share/doc/"$pkgname"
	install -Dm0644 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"
}

sha512sums="
56087b38b5bfafe24dd4fb66002ced7eccaaed441665c52a64a2da5e5bdf7ae1a7eea0ee4fda402b484f4d0ff12436bdb33f8138ce74e58677f087c3d973ea65  madonctl-2.3.2.tar.gz
"
